#include "Renderer.h"
#include <iostream>
using namespace std;


int main(int argc) 
{
	
	const int width = 1024;
	const int height = 1024;
	Vec3f light_dir(.0, -0, -1.0);
	auto white = TGAColor(255, 255, 255, 255);
	auto red = TGAColor(255, 0, 0, 255);
	auto render = Renderer(width, height);
	auto model = new Model("obj/african_head.obj");
	auto image = new TGAImage();
	image->read_tga_file("obj/african_head_diffuse.tga");
	float *zbuffer = new float[width * height]{};
	render.DrawMeshFaceWithUV(model, image, light_dir, zbuffer);
	//render.DrawMeshFace(model, white, light_dir, zbuffer);
	delete model;
	delete zbuffer;
	delete image;

	render.OutPut();

	return 0;
}


